package com.laery0.xixin.po;
//全局响应数据结构:封装数据状态
public class ResponseBean<T> {
//	业务数据
	private T data;
//	状态码
//	状态码是给程序用的
//	如果正常操作，状态为200
//	如果异常操作，状态为500
	private Integer status;
//  状态信息
//	状态信息是给最终用户看的
	private String msg;

	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}

	public ResponseBean() {
		
		super();
		// TODO Auto-generated constructor stub
	}
// 封装正常信息
	public ResponseBean(T data) {
		super();
		this.data = data;

		this.status=200;

		this.msg="success";
		
	}

//	封装异常信息
	public ResponseBean(Integer status, String msg) {
		super();
		this.status = status;
		this.msg = msg;
	}
	
	
	
	

	
	
	
	

}
